import { Component, Node, Quat, Vec3 } from "cc";

export class NodeData {
    public name: string;
    public position: Vec3;
    public rotation: Quat;
    public scale: Vec3;
    public components: ComponentData[];
}

export class ComponentData {
    public type: string;
    public jsonData: string;
}


export function saveNode(node: Node) {
    let nodeData = {
        name: node.name,
        position: node.position.clone(),
        rotation: node.rotation.clone(),
        scale: node.scale.clone(),
        components: []
    }
    for (let comp of node.components) {
        
    }
}

export function saveComponent(comp: Component) {

}